# 单引号字符串
str='this is a string'

# 双引号字符串
your_name='qinjx'
str="Hello, I know your are \"$your_name\"! \n"

# 拼接字符串
your_name="qinjx"
greeting="hello, "$your_name" !"
greeting_1="hello, ${your_name} !"
echo $greeting $greeting_1

# 获取字符串长度
string="abcd"
echo ${#string}

# 提取子字符串
string="alibaba is a great company"
echo ${string:1:4}

# 查找子字符串
string="alibaba is a great company"
echo `expr index "$string" is`